﻿<UserControl x:Class="ControlsSample.Samples.PaddedGrid"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:apexControls="clr-namespace:Apex.Controls;assembly=Apex.Silverlight"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">

    <UserControl.Resources>
        <ResourceDictionary Source="/Gallery.Silverlight;component/Resources/ResourceDictionaries/GalleryResources.xaml" />
    </UserControl.Resources>

    <Grid Style="{StaticResource GalleryItemStyle}">

        <apexControls:PaddedGrid Rows="Auto,Auto,*,Auto" Padding="4">

            <!-- Title section. -->
            <TextBlock Grid.Row="0" Style="{StaticResource Heading1}">PADDEDGRID</TextBlock>
            <TextBlock Grid.Row="1" Style="{StaticResource Subtitle}">
            The PaddedGrid is an ApexGrid that supports a padding property.
            </TextBlock>

            <!-- Sample zone. -->
            <Grid Row="2" Margin="16" MaxWidth="400" MaxHeight="300">
                <Grid>
                    <apexControls:PaddedGrid 
            Padding="6"
            Rows="Auto,Auto,Auto,Auto" Columns="*,2*">

                        <TextBlock Grid.Row="0" Grid.Column="0" TextWrapping="Wrap" Text="Padded Grid" />
                        <TextBox Grid.Row="0" Grid.Column="1" Text="Adds the 'Padding' property" />

                        <TextBlock Grid.Row="1" Grid.Column="0" TextWrapping="Wrap" Text="Dervied from ApexGrid" />
                        <TextBox Grid.Row="1" Grid.Column="1" Text="So it also has the 'Rows' and 'Columns' property" />

                        <TextBlock Grid.Row="2" Grid.Column="0" TextWrapping="Wrap" Text="Padding is a Thickness" />
                        <TextBox Grid.Row="2" Grid.Column="1" Text="I.e. Padding=&quot;4&quot; or Padding=&quot;4,3,6,7&quot;" />

                        <TextBlock Grid.Row="3" Grid.Column="0" TextWrapping="Wrap" Text="Uses" />
                        <TextBox Grid.Row="3" Grid.Column="1" Text="Great for data entry forms" />

                    </apexControls:PaddedGrid>
                </Grid>
            </Grid>
        </apexControls:PaddedGrid>
    </Grid>
</UserControl>
       
